FIND_PATH(TRITON_INCLUDE_DIR Triton.h)
FIND_LIBRARY(TRITON_LIBRARY NAMES Triton-MT-DLL)

FIND_PATH(SILVERLINING_INCLUDE_DIR SilverLining.h)
FIND_LIBRARY(SILVERLINING_LIBRARY NAMES SilverLining-MT-DLL)

IF(TRITON_INCLUDE_DIR AND TRITON_LIBRARY)
    SET(EXTERNAL_INCLUDE_DIR ${TRITON_INCLUDE_DIR})
    SET(EXTERNAL_LIBRARIES ${TRITON_LIBRARY} ${OPENGL_LIBRARIES})
    
    SET(EXAMPLE_NAME osgtriton)
    SET(EXAMPLE_FILES osgtriton.cpp TritonNode.cpp)
    
    IF(SILVERLINING_INCLUDE_DIR AND SILVERLINING_LIBRARY)
        SET(EXTERNAL_INCLUDE_DIR ${EXTERNAL_INCLUDE_DIR} ../osgsilverlining ${SILVERLINING_INCLUDE_DIR})
        SET(EXTERNAL_LIBRARIES ${EXTERNAL_LIBRARIES} ${SILVERLINING_LIBRARY})
        SET(EXAMPLE_FILES ${EXAMPLE_FILES} ../osgsilverlining/SilverLiningNode.cpp)
        ADD_DEFINITIONS(-DUSE_SILVERLINING_SKY)
    ENDIF(SILVERLINING_INCLUDE_DIR AND SILVERLINING_LIBRARY)
    
    START_EXAMPLE()
ENDIF(TRITON_INCLUDE_DIR AND TRITON_LIBRARY)
